#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<string>
using namespace std;

int main()
{
	//const char* p;
	//p = "china";
	string s = "faf afea adf af    ";
	string::iterator it = std::find(s.begin(), s.end(), ' ');
	s.replace(it, it+1, "%20");
	cout << s << endl;
	return 0;
}